/*
 * @Author: hukai huzhengen@gmail.com
 * @Date: 2025-06-23 16:04:32
 * @LastEditors: hukai huzhengen@gmail.com
 * @LastEditTime: 2025-07-25 10:30:24
 * @FilePath: \新建文件夹 (8)\foodOrderingSystem-ui\src\api\ingredient.js
 * @Description: 审批管理API
 */
import request from '@/utils/request'

// 查询审批列表
export function getList(data) {
    return request({
        url: '/food/approval/list',
        method: 'get',
        params: data
    })
}

// 删除审批记录
export function deleteApproval(approvalIds) {
    return request({
        url: '/food/approval/' + approvalIds,
        method: 'DELETE'
    })
}

// 修改审批记录
export function updateApproval(data) {
    return request({
        url: '/food/approval',
        method: 'put',
        data: data
    })
}

// 提交审批
export function submitApproval(data) {
    return request({
        url: '/food/approval',
        method: 'put',
        data: data
    })
}

// 新增审批
export function addApproval(data) {
    return request({
        url: '/food/approval',
        method: 'post',
        data: data
    })
}

// 获取审批详情
export function getApprovalDetail(data) {
    return request({
        url: '/food/approval/' + data,
        method: 'get'
    })
}

// /change/order/approval 订单审批
export function changerovall(data) {
    return request({
        url: '/change/order/approval',
        method: 'post',
        data: data
    })
}


// 修改订单启用时间 
export function chanconfigl(data) {
    return request({
        url: '/system/config',
        method: 'put',
        data: data
    })
}

// 
export function chanconfigKeyigl(configKey) {
    return request({
        url: `/system/config/configKey/object/${configKey}`,
        method: 'get',
    })
}
